package com.ys.web.user.login;

import com.alibaba.fastjson.JSON;
import com.ys.utils.base.j2se.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class LoginManager implements Runnable{
    @Autowired
    private LoginService loginService;

    @Override
    public void run() {
        while (true) {
            try {
                Thread.sleep(600000);
                showUToken();
            } catch (Exception e) {}
        }
    }

    private void showUToken(){
        if(loginService.uToken.size()>0){
            Logger.info("存在未清除的token:", JSON.toJSONString(loginService.uToken));
        }
    }
}
